import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [vue()],
  server: {
    proxy: {
      //这里配置/api的地址会请求https://api.ghac.yxytcar.cn/v2/api-docs
      '/api': {
        target: 'https://api.ghac.yxytcar.cn/v1/',
        changeOrigin: true,
        rewrite: (path) => path.replace(/^\/api/, ''),
      },},
      port:8000,
      hmr:true
    }
})
